% !TEX TS-program = lualatex
% !TEX encoding = UTF-8
% usual packages loading:
%\usepackage{luatextra}
%\usepackage{graphicx} % support the \includegraphics command and options
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper} % or letterpaper (US) or a5paper or....
\usepackage{gregoriotex} % for gregorio score inclusion

\input{../gsp-spaces}
\usepackage[garamond]{../mypackage}
% to change the font to something better, you can install the kpfonts package (if not already installed). To do so
% go open the "TeX Live Manager" in the Menu Start->All Programs->TeX Live 2010
\setgrefactor{17}

%\def\greinitialformat#1{{\fontsize{37}{37}\selectfont #1}}
%small > footnotesize > scriptsize > tiny

%\marginsize{35pt}{35pt}{30pt}{0pt}
\usepackage{calc}
\geometry{outer=35pt,inner=35pt,top=30pt+\headsep+\headheight,bottom=\footskip}
\pagestyle{fancy} % no header or footers

% here we begin the document
\begin{document}
\chead{\heading}

% Here we set the initial font. Change 43 if you want a bigger initial.
\def\greinitialformat#1{%
{\fontsize{\hymninitialsize}{\hymninitialsize}\selectfont #1}%
}

% We set red lines here, comment it if you want black ones.
%\redlines

% We set VII above the initial.
{\def\annot{\small{Hymn.}}
\def\annottwo{\small{\hymnlinetwo}}
\setinitialspacing{\hymninitial}

% We type a text in the top right corner of the score:
%\commentary{{\small \emph{Cf. Is. 30, 19 . 30 ; Ps. 79}}}

% and finally we include the score. The file must be in the same directory as this one.
\prehymn
\includescore{\hymntex}
\ifx\posthymn\undefined\else\posthymn\fi
}
\normalsize\vspace{0pt minus 20pt}
\selectlanguage{american}
\begin{multicols}{2}
\begin{psalmverses}
{\hymntranslation}
\end{psalmverses}
\end{multicols}
\selectlanguage{latin}
\smallskip
\ifx\vrtex\undefined%
\ifx\vr\undefined\else{\Vbar{}. \vr{}.

}\fi
\else{\vspace{0pt plus 18pt}%
{\greblockcustos\includescore{\vrtex}}%
\vspace{0pt plus 20pt}
\ifx\prevrtranslation\undefined\else\prevrtranslation\fi
\translation[]{
\Vbar{}. \vtranslation{}%
\ifx\vrnospace\undefined%
\\%
\else\if\vrnospace T%
\hspace{7ex minus 3ex}%
\else%
\\%
\fi\fi%
\Rbar{}. \rtranslation{}%
}%
}%
\fi%

\ifx\benedicamusdominotex\undefined\else

\emph{Magnificat}. \emph{Collect}.
\medskip

\def\annot{\small{\benedicamusdominotone}}
%\def\annottwo{}
\setinitialspacing{B}
\gresetfirstlineaboveinitial{\annot}{\annot}
\setsecondannotation{}
\setspaceafterinitial{0mm}
\setspacebeforeinitial{0mm}
\ifx\benedicamusdominointro\undefined\else
\hspace{3ex}\emph{\benedicamusdominointro:}\\
\fi
\includescore{\benedicamusdominotex}
\ifx\benedicamusdominotexalt\undefined\else
{%
\vspace{0pt plus 12pt}
\ifx\benedicamusdominoaltintro\undefined
\def\benedicamusdominoaltintro{or}\fi
\hspace{3ex}\emph{\benedicamusdominoaltintro:}\\
\def\annot{\small{\benedicamusdominotonealt}}
%\def\annottwo{}
\setinitialspacing{B}
\gresetfirstlineaboveinitial{\annot}{\annot}
\setsecondannotation{}
\setspaceafterinitial{0mm}
\setspacebeforeinitial{0mm}
\greblockcustos%
\includescore{\benedicamusdominotexalt}
}
\fi
\fi


\end{document}
